3.182 \(\int \frac{(a+b \log (c x^n))^p (d+e \log (f x^r))}{x} \, dx\)

Optimal. Leaf size=71 \[ \frac{\left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^{p+1}}{b n (p+1)}-\frac{e r \left (a+b \log \left (c x^n\right )\right )^{p+2}}{b^2 n^2 (p+1) (p+2)} \]

[Out]

-((e*r*(a + b*Log[c*x^n])^(2 + p))/(b^2*n^2*(1 + p)*(2 + p))) + ((a + b*Log[c*x^n])^(1 + p)*(d + e*Log[f*x^r])
)/(b*n*(1 + p))

________________________________________________________________________________________

Rubi [A]  time = 0.155253, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {2302, 30, 2366, 12} \[ \frac{\left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^{p+1}}{b n (p+1)}-\frac{e r \left (a+b \log \left (c x^n\right )\right )^{p+2}}{b^2 n^2 (p+1) (p+2)} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])^p*(d + e*Log[f*x^r]))/x,x]

[Out]

-((e*r*(a + b*Log[c*x^n])^(2 + p))/(b^2*n^2*(1 + p)*(2 + p))) + ((a + b*Log[c*x^n])^(1 + p)*(d + e*Log[f*x^r])
)/(b*n*(1 + p))

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2366

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c x^n\right )\right )^p \left (d+e \log \left (f x^r\right )\right )}{x} \, dx &=\frac{\left (a+b \log \left (c x^n\right )\right )^{1+p} \left (d+e \log \left (f x^r\right )\right )}{b n (1+p)}-(e r) \int \frac{\left (a+b \log \left (c x^n\right )\right )^{1+p}}{b n (1+p) x} \, dx\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^{1+p} \left (d+e \log \left (f x^r\right )\right )}{b n (1+p)}-\frac{(e r) \int \frac{\left (a+b \log \left (c x^n\right )\right )^{1+p}}{x} \, dx}{b n (1+p)}\\ &=\frac{\left (a+b \log \left (c x^n\right )\right )^{1+p} \left (d+e \log \left (f x^r\right )\right )}{b n (1+p)}-\frac{(e r) \operatorname{Subst}\left (\int x^{1+p} \, dx,x,a+b \log \left (c x^n\right )\right )}{b^2 n^2 (1+p)}\\ &=-\frac{e r \left (a+b \log \left (c x^n\right )\right )^{2+p}}{b^2 n^2 (1+p) (2+p)}+\frac{\left (a+b \log \left (c x^n\right )\right )^{1+p} \left (d+e \log \left (f x^r\right )\right )}{b n (1+p)}\\ \end{align*}

Mathematica [A]  time = 0.138806, size = 71, normalized size = 1. \[ \frac{\left (a+b \log \left (c x^n\right )\right )^{p+1} \left (-a e r-b e r \log \left (c x^n\right )+b d n p+2 b d n+b e n (p+2) \log \left (f x^r\right )\right )}{b^2 n^2 (p+1) (p+2)} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])^p*(d + e*Log[f*x^r]))/x,x]

[Out]

((a + b*Log[c*x^n])^(1 + p)*(2*b*d*n + b*d*n*p - a*e*r - b*e*r*Log[c*x^n] + b*e*n*(2 + p)*Log[f*x^r]))/(b^2*n^
2*(1 + p)*(2 + p))

________________________________________________________________________________________

Maple [C]  time = 0.277, size = 854, normalized size = 12. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^p*(d+e*ln(f*x^r))/x,x)

[Out]

-1/2*I*(b*n*ln(x)+a+b*(ln(c)+ln(x^n)-n*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+csgn(I*c))*(-csgn(I*c*x^n)
+csgn(I*x^n))))^(1+p)/b/n/(1+p)*e*Pi*csgn(I*f)*csgn(I*x^r)*csgn(I*f*x^r)+1/2*I*(b*n*ln(x)+a+b*(ln(c)+ln(x^n)-n
*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+csgn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(1+p)/b/n/(1+p)*e*Pi*c
sgn(I*f)*csgn(I*f*x^r)^2+1/2*I*(b*n*ln(x)+a+b*(ln(c)+ln(x^n)-n*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+cs
gn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(1+p)/b/n/(1+p)*e*Pi*csgn(I*x^r)*csgn(I*f*x^r)^2-1/2*I*(b*n*ln(x)+a+b*
(ln(c)+ln(x^n)-n*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+csgn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(1+p)/
b/n/(1+p)*e*Pi*csgn(I*f*x^r)^3+(b*n*ln(x)+a+b*(ln(c)+ln(x^n)-n*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+cs
gn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(1+p)/b/n/(1+p)*e*r*ln(x)+(b*n*ln(x)+a+b*(ln(c)+ln(x^n)-n*ln(x)-1/2*I*
Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+csgn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(1+p)/b/n/(1+p)*e*ln(f)+(b*n*ln(x)+
a+b*(ln(c)+ln(x^n)-n*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+csgn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(1
+p)/b/n/(1+p)*e*(ln(x^r)-r*ln(x))+(b*n*ln(x)+a+b*(ln(c)+ln(x^n)-n*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)
+csgn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(1+p)/b/n/(1+p)*d-1/b^2/n^2/(1+p)*e*r*(b*n*ln(x)+a+b*(ln(c)+ln(x^n)
-n*ln(x)-1/2*I*Pi*csgn(I*c*x^n)*(-csgn(I*c*x^n)+csgn(I*c))*(-csgn(I*c*x^n)+csgn(I*x^n))))^(2+p)/(2+p)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^p*(d+e*log(f*x^r))/x,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 0.824167, size = 518, normalized size = 7.3 \begin{align*} -\frac{{\left (b^{2} e r \log \left (c\right )^{2} - a b d n p - 2 \, a b d n + a^{2} e r -{\left (b^{2} e n^{2} p + b^{2} e n^{2}\right )} r \log \left (x\right )^{2} -{\left (b^{2} d n p + 2 \, b^{2} d n - 2 \, a b e r\right )} \log \left (c\right ) -{\left (a b e n p + 2 \, a b e n +{\left (b^{2} e n p + 2 \, b^{2} e n\right )} \log \left (c\right )\right )} \log \left (f\right ) -{\left (b^{2} e n p r \log \left (c\right ) + b^{2} d n^{2} p + a b e n p r + 2 \, b^{2} d n^{2} +{\left (b^{2} e n^{2} p + 2 \, b^{2} e n^{2}\right )} \log \left (f\right )\right )} \log \left (x\right )\right )}{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p}}{b^{2} n^{2} p^{2} + 3 \, b^{2} n^{2} p + 2 \, b^{2} n^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^p*(d+e*log(f*x^r))/x,x, algorithm="fricas")

[Out]

-(b^2*e*r*log(c)^2 - a*b*d*n*p - 2*a*b*d*n + a^2*e*r - (b^2*e*n^2*p + b^2*e*n^2)*r*log(x)^2 - (b^2*d*n*p + 2*b
^2*d*n - 2*a*b*e*r)*log(c) - (a*b*e*n*p + 2*a*b*e*n + (b^2*e*n*p + 2*b^2*e*n)*log(c))*log(f) - (b^2*e*n*p*r*lo
g(c) + b^2*d*n^2*p + a*b*e*n*p*r + 2*b^2*d*n^2 + (b^2*e*n^2*p + 2*b^2*e*n^2)*log(f))*log(x))*(b*n*log(x) + b*l
og(c) + a)^p/(b^2*n^2*p^2 + 3*b^2*n^2*p + 2*b^2*n^2)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**p*(d+e*ln(f*x**r))/x,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.34044, size = 332, normalized size = 4.68 \begin{align*} \frac{\frac{{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p + 1} e \log \left (f\right )}{p + 1} + \frac{{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p + 1} d}{p + 1} - \frac{{\left ({\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p} b p \log \left (c\right ) -{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{2}{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p} p +{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p} a p + 2 \,{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p} b \log \left (c\right ) -{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{2}{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p} + 2 \,{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}{\left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )}^{p} a\right )} r e}{{\left (p^{2} + 3 \, p + 2\right )} b n}}{b n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^p*(d+e*log(f*x^r))/x,x, algorithm="giac")

[Out]

((b*n*log(x) + b*log(c) + a)^(p + 1)*e*log(f)/(p + 1) + (b*n*log(x) + b*log(c) + a)^(p + 1)*d/(p + 1) - ((b*n*
log(x) + b*log(c) + a)*(b*n*log(x) + b*log(c) + a)^p*b*p*log(c) - (b*n*log(x) + b*log(c) + a)^2*(b*n*log(x) +
b*log(c) + a)^p*p + (b*n*log(x) + b*log(c) + a)*(b*n*log(x) + b*log(c) + a)^p*a*p + 2*(b*n*log(x) + b*log(c) +
 a)*(b*n*log(x) + b*log(c) + a)^p*b*log(c) - (b*n*log(x) + b*log(c) + a)^2*(b*n*log(x) + b*log(c) + a)^p + 2*(
b*n*log(x) + b*log(c) + a)*(b*n*log(x) + b*log(c) + a)^p*a)*r*e/((p^2 + 3*p + 2)*b*n))/(b*n)